import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

/**
 * 项目名称：wangxu
 * 类 名 称：HJ14
 * 描 述：
 * 创建时间：2023/3/12 7:26 下午
 * 创 建 人：wang-xu
 */
public class HJ14 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String[] str = new String[n];
        for (int i = 0; i < n; i++) {
            str[i] = in.next();
        }
        List<String> list = new ArrayList<>();
        for (String s:str) {
            list.add(s);
        }
        Collections.sort(list);
        for (String s:list) {
            System.out.println(s);
        }
    }
}
